#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int num=1;
	while (num>=1&&num<=100)
	{
		if (num % 3 == 0)
		{
			printf("%d ", num);
			num++;

		}
		else
		{
			num++;
		}
	}
	return 0;
}